<%--
  Created by IntelliJ IDEA.
  User: Admin
  Date: 2020/8/27
  Time: 14:08
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%String path = request.getContextPath();%>
<script src="<%=path%>/static/js/jquery-1.8.3.js"></script>
<script src="static/js/path.js"></script>
<script src="static/js/userUpdate.js"></script>
<!DOCTYPE html>
<html lang="zh-cn">
<head>

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>i学习</title>
    <script src="<%=path%>/static/js/head.js"></script>
    <link rel="stylesheet" href="<%=path%>/static/css/index.css">
    <link rel="stylesheet" href="<%=path%>/static/css/homeindex.css">
    <link rel="stylesheet" href="<%=path%>/static/css/home.css">
    <link rel="stylesheet" href="<%=path%>/static/css/comment.css">
    <style>
        #l{
           /* background-color: #0dd7f6;*/
            text-align: center;
            margin: auto;
        }
    </style>
</head>
<body>
    <!-- 顶部   -->
    <jsp:include page="include/head.jsp"></jsp:include>

    <!-- 内容   -->
    <div class="logobox width_1200">
        <div class="logo left_f">
            <a href="welcome.jsp">
                <img src="<%=path%>/static/img/logo.jpeg" width="60" height="120">
            </a>
        </div>

            <div class="searchbox left_f">
                <div class="input clearfix">
                    <form action="<%=path%>/index?action=getlistbyname" method="post">
                        <input type="text"  style="width: 418px;font-size: 16px" name="videoname" placeholder="请输入关键词">
                        <span><input style="margin-left: 66px; text-index:0px;width: 110px;font-size: 22px;border:#000000 2px solid" type="submit" value="站内搜索"></span>
                    </form>
                </div>

            </div>


        <a class="myclass left_f" rel="nofollow"
           href="<%=path%>/upload.jsp"> <span class="icons"></span>我要上传</a>
    </div>
</div>
<div class="i_bg bg_color">
    <div class="m_content">
        <div class="m_left">
            <div class="left_n">管理中心</div>
            <div class="left_m">
                <div class="left_m_t t_bg1"><a href="<%=path%>/userServlet?action=personInfo">个人中心</a></div>
            </div>
            <div class="left_m">
                <div class="left_m_t t_bg2"><a href="<%=path%>/Comment?action=getCommentByUser">我的评论</a>
                </div>
            </div>
            <div class="left_m">
                <div class="left_m_t t_bg3"><a href="<%=path%>/Watch?action=getWatchlist">观看历史</a></div>
            </div>
                <div class="left_m">
                    <div class="left_m_t t_bg1"><a href="<%=path%>/uploadServlet?action=going">我要上传</a></div>
                </div>
                <c:if test="${sessionScope.user.userType>2}">
            <div class="left_m">
                <div class="left_m_t t_bg4"><a href="<%=path%>/userServlet?action=userManage">用户管理</a></div>
            </div>
            <div class="left_m">
                <div class="left_m_t t_bg5"><a href="<%=path%>/uploadServlet?action=getList">视频审核</a></div>
            </div>
            </c:if>
        </div>

        <div class="m_right">
            <div class="m_des" style="">
                <table border="0" style="width: 800px; line-height:11px;" cellspacing="0" cellpadding="0" id="l">
                    <tr class="td" style="padding: 0px; height: 54px;">
                        <th style="overflow: hidden ; width: 120px; margin: 16px;text-align: left;padding: 30px;">id：</th>
                        <td style="overflow: hidden; width: 120px; margin: 16px;"><input readonly="readonly" type="text" id="userId" value="${requestScope.data0.userId}"></td>
                    </tr>
                    <tr class="td" style="padding: 0px; height: 54px;">
                        <th style="overflow: hidden ; width: 120px; margin: 16px;text-align: left;padding: 30px;">登陆名：</th>
                        <td style="overflow: hidden; width: 120px; margin: 16px;"><input type="text" id="userLoginName" value="${requestScope.data0.userLoginName}"></td>
                    </tr>
                    <tr class="td" style="padding: 0px; height: 54px;">
                        <th style="overflow: hidden ; width: 120px; margin: 16px;text-align: left;padding: 30px;">用户昵称：</th>
                        <td style="overflow: hidden; width: 120px; margin: 16px;"><input type="text" id="userName" value="${requestScope.data0.userName}"></td>
                    </tr>
                    <tr class="td" style="padding: 0px; height: 54px;">
                        <th style="overflow: hidden ; width: 120px; margin: 16px;text-align: left;padding: 30px;">用户类型：</th>
                        <td style="overflow: hidden; width: 120px; margin: 16px;">
<%--                            <input type="text" id="userType" value="${requestScope.data0.userTypeName}">--%>
                            <select id="userType">
                                <c:forEach items="${requestScope.data1}" var="e">
                                    <option value="${e.userTypeId}">${e.userTypeName}</option>
                                </c:forEach>
                            </select>
                        </td>

                    </tr>
                    <tr class="td" style="padding: 0px; height: 54px;">
                        <th style="overflow: hidden ; width: 120px; margin: 16px;text-align: left;padding: 30px;">积分：</th>
                        <td style="overflow: hidden; width: 120px; margin: 16px;"><input type="text" id="userMoney" value="${requestScope.data0.userMoney}"></td>
                    </tr>
                    <tr class="td" style="padding: 0px; height: 54px;">
                        <th onclick="f()" style="overflow: hidden ; width: 120px; margin: 16px;text-align: left;padding: 30px;" colspan="2">
                            <div align="center">提交</div>
                        </th>
                    </tr>
                </table>
            </div>
            </div>
    </div>
    <div class="btmbg">
        <div class="btm">
            <div >
                <div>
                    <span>关于我们</span>
                    <span>联系我们</span>
                    <span>诚聘英才</span>
                    <span>商务合作</span>
                    <span>常见问题</span>
                </div>
                <div>
                    <a href="//beian.miit.gov.cn/" rel="nofollow">备案许可号：赣ICP备08666666号</a>
                    <a target="_blank">赣公网安备 0000000000000000000号</a>
                    <span>出版经营许可证</span>
                </div>
                <div>
                    <span>运营公司：江西i学习教育咨询有限公司</span>
                    <span>法律顾问：张律师</span>
                </div>
                <div>
                    Ixuexi,All Rights Reserved.版权所有 i学习
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript">
    function del(id) {
        $.ajax({
            url: "/Comment",
            data:{
                action:"delComment",
                id:id
            },
            method: "POST",
            dataType: "json",
            success: function (result) {
                if(result.status === 1){
                    alert(result.message);
                    window.location.reload();
                }
            }
        });
    }
</script>
</body>
</html>
